home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / newsgroups / misc.19971216-19980424 / 000045_news@newsmaster….columbia.edu _Sun Jan 4 04:50:36 1998.msg < prev    next >
Internet Message Format  |  1998-04-22  |  5KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id EAA13984
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Sun, 4 Jan 1998 04:50:36 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id EAA21498
  7.     for kermit.misc@watsun; Sun, 4 Jan 1998 04:50:35 -0500 (EST)
  8. Path: news.columbia.edu!panix!logbridge.uoregon.edu!news.maxwell.syr.edu!newsswitch.lcs.mit.edu!news.ultranet.com!not-for-mail
  9. From: jasantos@ultranet.com (John A Santos)
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Re: Problem with CKERMIT TRANSMIT
  12. Date: Sun, 4 Jan 1998 04:38:20 -0500
  13. Organization: UltraNet Communications, Inc.   http://www.ultranet.com/
  14. Lines: 77
  15. Message-ID: <MPG.f192292fb7106f198968e@news.ma.ultranet.com>
  16. References: <34aef5e4.0@amhnt2.amherst.edu> <34AF0373.4DDE@videotron.ca>
  17. NNTP-Posting-Host: d19.dial-1.wal.ma.ultra.net
  18. X-Complaints-To: abuse@ultra.net
  19. X-Ultra-Time: 4 Jan 1998 09:40:35 GMT
  20. X-Newsreader: Anawave Gravity v2.00.753
  21. Xref: news.columbia.edu comp.protocols.kermit.misc:8212
  22.  
  23. In article <34AF0373.4DDE@videotron.ca>, jf mezei <"[non-
  24. spam]jfmezei"@videotron.ca> says...
  25. > John W. Manly wrote:
  26. > > Hi, all.  I've been running into a very frustrating problem with the CKERMIT
  27. > > TRANSMIT command when used over TCP/IP to a port other than the standard
  28. > > TELNET port (port 23).
  29. > > But the TRANSMIT operation never seems to work, though the rest of the
  30. > > script does work.  
  31. > Been there, experienced the same thing. I fixed it wth the use of 
  32. > open read file.name
  33. > :myloop
  34. > read \%a
  35. > if fail goto mydone
  36. > output \%a\%13
  37. > goto myloop
  38. > :mydone
  39. > close read
  40. > Also, what I find most interesting is that sending \13 seems to result
  41. > in 
  42. > \13\10 being sent ! 
  43. > I am on VMS 5.5-2, CKERMIT 6.0.192 6 sep 96   (VAX, of course).
  44. > TCP stack is CMU-IP.
  45. We're using C-Kermit to talk to an SMTP server, using both output
  46. and TRANSMIT commands.  The key (for OUTPUT) is you need to do
  47. INPUT's to soak up the echoes and responses from the server.  SMTP
  48. gives numeric response codes for various commands and errors;
  49. we look for these in the responses to make sure everything is working.
  50. The data (i.e. mail message) doesn't produce a response, just an echo.
  51. I think it is the SMTP server that is echoing \13 as \13\10, not
  52. Kermit sending \13\10.  Anyway, we were sending each line with a \13
  53. and then waiting for the \13\10 in the response with an INPUT.
  54.  
  55. If you use TRANSMIT, it should soak up the echoes for you automatically
  56. but it won't understand the protocol stuff.  I'm not familiar with
  57. NNTP, but SMTP has some specific handshaking that you have to do with
  58. the server and I think NNTP must be similar.  You need to send a
  59. HELO hostname command, and wait for the response, to identify the sending
  60. system.  Then you need to send a FROM: command and a TO: command,
  61. identifying the sender and receiver's mail addresses, waiting for
  62. responses in each case.  (I forget the precise order and format of
  63. these commands...)  Then you need to send a DATA command.  The server
  64. replies to the data command with a message telling you its okay to
  65. start sending, and to terminate the message with a line with a single
  66. period.  When we get this message, we send a text file with the formatted
  67. mail message in it, using TRANSMIT.  After the transmit, we OUTPUT .\13
  68. and wait for the SMTP server to say it got it (with another INPUT.)
  69.  
  70. There are a couple of gotcha's with SMTP that might apply to NNTP, too.
  71. SMTP uses a line consisting solely of a period to indicate end-of-
  72. message, so you have to stuff an extra period at the beginning of
  73. any line starting with a period to avoid it seeing a false end-of-
  74. message.  We do this in formatting the mail message file before
  75. transmitting it.
  76.  
  77. The second gotcha is really a Kermit issue.  OUTPUT has an escape
  78. mechanism: \number gets converted to an ASCII character whose value
  79. is the number (e.g. \13 gets converted to <CR>), and \{special-char}
  80. gets converted as well, where special-char is any of a list of
  81. things.  For example, \n becomes a <null>, \\ becomes a single back-
  82. slash, etc.  We need to suppress the translation to allow these literal
  83. strings to appear in mail messages (\n wreaks havoc with C programs,
  84. and all the substitutions occur with annoying frequency in MIME-encoded
  85. documents.)  There is a work-around for this (can I mention it yet,
  86. Frank?), but TRANSMIT doesn't have this problem, and is quite a bit
  87. faster than a READ-OUTPUT-INPUT loop, so we use TRANSMIT for the body
  88. of the message.
  89.  
  90. Hope this helps.
  91.  
  92. John Santos
  93.